﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DxfFilesScan
{
    public class DxfInfo
    {
        private string dir;
        public DxfInfo(string dir, string fullName)
        {
            this.dir = dir;
            FullName = fullName;
            ModifiedDate = new FileInfo(fullName).LastWriteTime.ToString("MM.dd.HH.mm.ss");
        }
        public string FullName { get; private set; }
        public string ModifiedDate { get; private set; }

        public override string ToString()
        {
            return $"{FullName.Replace(dir, "")} % {ModifiedDate}";
        }

        public static string[] Split(string s)
        {
            return s.Split(new char[] { '%' }, StringSplitOptions.RemoveEmptyEntries);
        }
    }


}
